$linkGap: 5px;
.card-panel {
  transition: box-shadow 0.25s;
  padding: $card-padding;
  margin: 0;
  border-radius: 2px;
  @extend .z-depth-1;
  background-color: $card-bg-color;
}

.card {
  position: relative;
  margin: 0;
  background-color: $card-bg-color;
  transition: box-shadow 0.25s;
  border-radius: 2px;
  @extend .z-depth-1;
  @media #{$small-and-down} {
    box-shadow: none;
  }
  .card-title {
    font-size: 24px;
    &.activator {
      cursor: pointer;
    }
    a {
      color: $primary-color;
      // font-weight: bold;
      white-space: nowrap;
      text-overflow: ellipsis;
      overflow: hidden;
      width: 100%;
      display: inline-block;
    }
  } // Card Sizes
  &.small,
  &.medium,
  &.large {
    position: relative;
    .card-image {
      max-height: 60%;
      overflow: hidden;
    }
    .card-image + .card-content {
      max-height: 40%;
    }
    .card-content {
      max-height: 100%;
      overflow: hidden;
    }
    .card-action {
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
    }
  }
  &.small {
    height: 300px;
  }
  &.medium {
    height: 400px;
  }
  &.large {
    height: 500px;
  } // Horizontal Cards
  &.horizontal {
    &.small,
    &.medium,
    &.large {
      .card-image {
        height: 100%;
        max-height: none;
        overflow: visible;
        img {
          height: 100%;
        }
      }
    }
    display: flex;
    .card-image {
      max-width: 50%;
      img {
        border-radius: 2px 0 0 2px;
        max-width: 100%;
        width: auto;
      }
    }
    .card-stacked {
      display: flex;
      flex-direction: column;
      flex: 1;
      position: relative;
      .card-content {
        flex-grow: 1;
      }
    }
  } // Sticky Action Section
  &.sticky-action {
    .card-action {
      z-index: 2;
    }
    .card-reveal {
      z-index: 1;
      padding-bottom: 64px;
    }
  }
  .card-image {
    position: relative; // Image background for content
    img {
      display: block;
      border-radius: 2px 2px 0 0;
      position: relative;
      left: 0;
      right: 0;
      top: 0;
      bottom: 0;
      width: 100%;
    }
    .card-title {
      color: $card-bg-color;
      position: absolute;
      bottom: 0;
      left: 0;
      max-width: 100%;
      padding: $card-padding;
    }
  }
  .card-content {
    padding: $card-padding-mobile $card-padding;
    @media #{$small-and-down} {
      padding-left: $card-padding-mobile;
      padding-right: $card-padding-mobile;
    }
    border-radius: 0 0 2px 2px;
    p {
      margin: 0;
      color: inherit;
    }
  }
  .card-header {
    position: relative;
    background-color: inherit;
    border-bottom: 1px solid rgba(160, 160, 160, 0.2);
    padding: 16px 24px;
    @media #{$small-and-down} {
      padding-left: $card-padding-mobile;
      padding-right: $card-padding-mobile;
    }
    &.postinfo {
      padding-top: 24px;
      padding-bottom: 24px;
      .card-title {
        display: block;
        line-height: 32px;
        i {
          line-height: 32px;
        }
      }
      .card-meta {
        display: block;
        line-height: 20px;
        i {
          line-height: 20px;
          color: $muted-color;
          vertical-align: middle;
        }
        time {
          vertical-align: middle;
          display: inline-block;
          color: $muted-color;
        }
        address {
          display: inline-block;
          font-style: normal;
          vertical-align: middle;
          &:before {
            content: "";
            margin: 0 6px;
            $width: 11px;
            display: inline-block;
            height: $width;
            border: {
              top: $width/2 solid transparent;
              bottom: $width/2 solid transparent;
              left: $width solid $link-color;
            }
          }
        }
      }
    }
    &.date {
      color: $muted-color;
      line-height: 25px;
      padding-right: $card-padding - 13px;
      @media #{$small-and-down} {
        padding-right: $card-padding-mobile - 13px;
      }
      .group {
        white-space: nowrap;
        display: inline-block;
        margin-right: 13px;
        @media #{$small-and-down} {
          display: block;
        }
      }
      i,
      time,
      address {
        font-style: normal;
        display: inline-block;
        vertical-align: middle;
      }
      i {
        font-size: 20px;
      }
      a {
        // color: inherit;
        border-bottom: 1px dotted;
      }
    }
  }
  .card-action {
    &:last-child {
      border-radius: 0 0 2px 2px;
    }
    position: relative;
    background-color: inherit;
    border-top: 1px solid rgba(160, 160, 160, 0.2);
    padding: $card-padding-mobile $card-padding;
    @media #{$small-and-down} {
      padding-left: $card-padding-mobile;
      padding-right: $card-padding-mobile;
    }
    &.card-action-links {
      display: flex;
      justify-content: flex-start;
      flex-flow: row wrap;
      align-items: center;
      align-content: flex-start;
      padding: $card-padding-mobile $card-padding - $linkGap
        $card-padding-mobile - $linkGap $card-padding;
      @media #{$small-and-down} {
        padding-left: $card-padding-mobile;
        padding-right: $card-padding-mobile - $linkGap;
      }
      .btn {
        flex: 0 1 auto;
        margin: 0 5px 5px 0;
      }
    }
  }
  .card-reveal {
    padding: $card-padding;
    position: absolute;
    background-color: $card-bg-color;
    width: 100%;
    overflow-y: auto;
    left: 0;
    top: 100%;
    height: 100%;
    z-index: 3;
    display: none;
    .card-title {
      cursor: pointer;
      display: block;
    }
  }
}
